package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 移位明细
 * </p>
 *
 * @author LEO
 * @since 2020-08-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_move_register")
@ApiModel(value="MoveRegister对象", description="移位明细登记")
public class MoveRegister extends BasicEntity {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "code")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "所属机构")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "移位单号")
    @TableField("move_code")
    private String moveCode;

    @ApiModelProperty(value = "移位明细单号")
    @TableField("move_item_code")
    private String moveItemCode;

    @ApiModelProperty(value = "库存标识")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "商品编码")
    @TableField("goods_code")
    private String goodsCode;

    // TODO: 2020/11/12 记得加字段
    @ApiModelProperty(value = "商品编码")
    @TableField("good_code")
    private String goodCode;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "商品条码")
    @TableField("goods_bar_code")
    private String goodsBarCode;

    @ApiModelProperty(value = "货主编码")
    @TableField("shipment_code")
    private String shipmentCode;

    @ApiModelProperty(value = "单位")
    @TableField("goods_unit")
    private String goodsUnit;

    @ApiModelProperty(value = "生产日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("gmt_manufacture")
    private LocalDateTime gmtManufacture;

    @ApiModelProperty(value = "过期日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("gmt_expire")
    private LocalDateTime gmtExpire;

    @ApiModelProperty(value = "存货日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("gmt_stock")
    private LocalDateTime gmtStock;

    @ApiModelProperty(value = "供应商")
    @TableField("supplier")
    private String supplier;

    @ApiModelProperty(value = "序列号")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty(value = "扩展1")
    @TableField("extend_one")
    private String extendOne;

    @ApiModelProperty(value = "扩展2")
    @TableField("extend_two")
    private String extendTwo;

    @ApiModelProperty(value = "扩展3")
    @TableField("extend_three")
    private BigDecimal extendThree;

    @ApiModelProperty(value = "扩展4")
    @TableField("extend_four")
    private BigDecimal extendFour;

    @ApiModelProperty(value = "扩展5")
    @TableField("extend_five")
    private LocalDateTime extendFive;

    @ApiModelProperty(value = "扩展6")
    @TableField("extend_six")
    private LocalDateTime extendSix;


    @ApiModelProperty(value = "库存批次号")
    @TableField("lot")
    private String lot;

    @ApiModelProperty(value = "收货批次号")
    @TableField("receive_lot")
    private String receiveLot;

    @ApiModelProperty(value = "锁定状态")
    @TableField("is_lock")
    private Integer isLock;

    @ApiModelProperty(value = "确认单状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "库存状态")
    @TableField("goods_status")
    private String goodsStatus;

    @ApiModelProperty(value = "库存状态")
    @TableField("goods_status_name")
    private String goodsStatusName;

    @ApiModelProperty(value = "移位数量")
    @TableField("move_quantity")
    private BigDecimal moveQuantity;

    @ApiModelProperty(value = "库位")
    @TableField("location")
    private String location;

    @ApiModelProperty(value = "移入库位")
    @TableField("target_location")
    private String targetLocation;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @TableField("need_quantity")
    @ApiModelProperty(value = "需要移位的数量")
    private BigDecimal needQuantity;

    //更改成计划数量的值,值在变化，当为0时，说明移位下架完成
    @TableField("moved_quantity")
    @ApiModelProperty(value = "已经移位的数量")
    private BigDecimal movedQuantity;

    @TableField("source")
    @ApiModelProperty(value = "来源，1-移位下架，2-移位上架")
    private Integer source;

    @TableField("source_type")
    @ApiModelProperty(value = "来源类型，1-pda，2-pc")
    private Integer sourceType;


}
